import * as type from '../mutation-type'

const initState = {
  // 详情
  optometrist: {
    id: null,
    avatar: null,
    name: null,
    phone: null,
    emergency_phone: null,
    gender: null,
    title: null,
    comment: null,
    address: null,
  },
  // 列表
  optometrists: [],
}

const state = _.cloneDeep(initState)

const mutations = {
  // 列表
  [type.GET_OPTOMETRISTS] (state, value) {
    state.optometrists = value
  },

  // 详情
  [type.GET_OPTOMETRIST] (state, value) {
    state.optometrist = value
  },

}

export default {
  state,
  mutations
}
